$def with (lst, check_owner=True, owns_page=False)

$var title: $lst.name

$ is_owner = owns_page
$ username = ctx.user and ctx.user['key'].split('/')[-1]

$if check_owner and username:
    $ is_owner = username == lst['key'].split('/')[2]

$ template = MyBooksTemplate(lst['key'].split('/')[2], 'list').render(
    $   header_title= "",
    $   template=render_template("type/list/view_body", lst, is_owner),
    $   page=lst
    $ )
$:template
